#include "Window.hpp"
#include "RedSFML.hpp"

namespace red {
	Window::Window() : sf::RenderWindow(){

	}

	void Window::Initialize(u32 pWidth, u32 pHeight, const std::string &pTitle){
		// RenderWindow creation
		Create(sf::VideoMode(pWidth, pHeight), pTitle);

		// Window Icon
		sf::Image mIcon;
		if(!mIcon.LoadFromFile("RedSoftworksIcon.png"))
			std::cout << "Error while loading icon. Is \"RedSoftworksIcon.png\" present?" << std::endl;
		else
			SetIcon(32,32, mIcon.GetPixelsPtr());
	}

	void Window::ClearBackground(const Color &pColor){
		Clear(RedToSFMLColor(pColor));
	}
}